<?php
class usermodel extends CI_Model
{
    public function __construct()
    {
        $this->load->database();
    }

    public function validate()
    {
        $this->load->helper('url');
        $email=$this->input->post('username');
        $password=$this->input->post('password');
        $this->db->select('user_id');
        $query=$this->db->get_where('user',array('user_password'=>$password,'user_id'=>$email));
        $result_id= $query->result_array();
        return $result_id;
    }

}
